<!--
 * @Description: 
 * @Version: 1.0
 * @Author: Yuanjy
 * @Date: 2020-03-09 20:41:17
 * @LastEditors: 任飞
 * @LastEditTime: 2020-07-06 00:55:06
 -->
<template>
  <div class="app-container">
    <eHeader :id="data.id" :query="query" />
    <!--表格渲染-->
    <el-table v-loading="loading" ref="multipleTable" :data="data" :tree-props="{children: 'children', hasChildren: 'hasChildren'}" row-key="id" border fit highlight-current-row @selection-change="handleSelectionChange">
      <el-table-column type="selection" width="55"/>
      <el-table-column prop="applyTime" label="申请时间" />
      <el-table-column prop="withdrawAmt" label="提现金额" />
      <el-table-column prop="ownerName" label="申请人" />
      <el-table-column prop="statusName" label="状态" />     
    </el-table>
    <el-pagination
      :total="total"
      :page-size="limit"
      style="margin-top: 8px;"
      layout="total, prev, pager, next, sizes"
      @size-change="sizeChange"
      @current-change="pageChange"/>
  </div>
</template>

<script>
import checkPermission from '@/utils/permission' // 权限判断函数
import initData from '@/mixins/initData'
import treeTable from '@/components/TreeTable'
import { parseTime } from '@/utils/index'
import eHeader from './module/header'
import edit from './module/edit'
export default {
  components: { eHeader, edit, treeTable },
  mixins: [initData],
  data() {
    return {
      delLoading: false,
      sup_this: this,
      loading: true,
      multipleSelection: []
    }
  },
  created() {
    this.$nextTick(() => {
      this.init()
    })
  },
  methods: {
    parseTime,
    checkPermission,
    beforeInit() {
      this.url = '/admin/withDraw/listPage'
      const query = this.query
      const value = query.value
      this.params = { pageNum: this.page, pageSize: this.limit, startDate: this.query.startDate, endDate: this.query.endDate, withDrawStatus: this.query.withDrawStatus }
      if (value) { this.params['name'] = value }
      return true
    },
    handleSelectionChange(val) {
      this.multipleSelection = val;
    },
  }
}
</script>

<style scoped>

</style>
